<template>
  <Verify
    ref="verify"
    :captcha-type="'blockPuzzle'"
    :img-size="{ width: '330px', height: '155px' }"
    :mode="'pop'"
    @cancel="cancelHandle"
    @success="verifySuccessHandle"
  />
</template>

<script>
import Verify from './Verify'

export default {
  name: 'Verification',
  components: {
    Verify
  },
  created() {
  },
  methods: {
    /**
     * @description: 移出
     */
    close() {
      this.visible = false
      setTimeout(() => {
        this.$el.parentNode.removeChild(this.$el)
      }, 300)
    },
    verifySuccessHandle(params) {
      let slideCode = params.captchaVerification
      this.callback('verifySuccess', slideCode)
      this.close()
    },
    cancelHandle(){
      this.callback('cancel')
    }
  }
}
</script>

<style scoped>

</style>
